package com.spic.business.ioc.service.impl;

import com.spic.business.ioc.domain.IocNoiseData;
import com.spic.business.ioc.mapper.IocNoiseDataMapper;
import com.spic.business.ioc.service.IIocNoiseDataService;
import com.spic.common.core.utils.UUIDUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 噪声数据Service业务层处理
 *
 * @author spic
 * @date 2022-04-14
 */
@Service
public class IocNoiseDataServiceImpl implements IIocNoiseDataService
{
    @Autowired
    private IocNoiseDataMapper iocNoiseDataMapper;

    /**
     * 查询噪声数据
     *
     * @param id 噪声数据主键
     * @return 噪声数据
     */
    @Override
    public IocNoiseData selectIocNoiseDataById(String id)
    {
        return iocNoiseDataMapper.selectIocNoiseDataById(id);
    }

    /**
     * 查询噪声数据列表
     *
     * @param iocNoiseData 噪声数据
     * @return 噪声数据
     */
    @Override
    public List<IocNoiseData> selectIocNoiseDataList(IocNoiseData iocNoiseData)
    {
        return iocNoiseDataMapper.selectIocNoiseDataList(iocNoiseData);
    }

    /**
     * 新增噪声数据
     *
     * @param iocNoiseData 噪声数据
     * @return 结果
     */
    @Override
    public int insertIocNoiseData(IocNoiseData iocNoiseData)
    {
        String uuid = UUIDUtil.createUUID();
        iocNoiseData.setId(uuid);
        return iocNoiseDataMapper.insertIocNoiseData(iocNoiseData);
    }

    /**
     * 修改噪声数据
     *
     * @param iocNoiseData 噪声数据
     * @return 结果
     */
    @Override
    public int updateIocNoiseData(IocNoiseData iocNoiseData)
    {
        return iocNoiseDataMapper.updateIocNoiseData(iocNoiseData);
    }

    /**
     * 批量删除噪声数据
     *
     * @param ids 需要删除的噪声数据主键
     * @return 结果
     */
    @Override
    public int deleteIocNoiseDataByIds(String[] ids)
    {
        return iocNoiseDataMapper.deleteIocNoiseDataByIds(ids);
    }

    /**
     * 删除噪声数据信息
     *
     * @param id 噪声数据主键
     * @return 结果
     */
    @Override
    public int deleteIocNoiseDataById(String id)
    {
        return iocNoiseDataMapper.deleteIocNoiseDataById(id);
    }

    /**
     * @return 噪声数据
     */

    @Override
    public List<Map<String, Object>> getNoiseData()
    {
        return null;
    }
}
